function checkLogin(form)
{ 
    LoginController.CheckLogin(
        form.login.value, 
        form.password.value, 
        function(result)
        {
            if (result == true)
            {
                form.submit();
            }
            else
            {
                form.login.className = 'ErrorBox';
                form.password.className = 'ErrorBox';
            }
        }
    );
}
